if (SERVER) then
	resource.AddFile( "models/weapons/v_pfinger.mdl" )
	resource.AddFile( "models/weapons/v_pfinger.vvd" )
	resource.AddFile( "models/weapons/v_pfinger.dx80.vtx" )
	resource.AddFile( "models/weapons/v_pfinger.dx90.vtx" )
	resource.AddFile( "models/weapons/v_pfinger.sw.vtx" )
	AddCSLuaFile("shared.lua")
	
	SWEP.Weight = 1
end

if (CLIENT) then

	SWEP.PrintName = "Targeter"
	SWEP.Slot = 1
	SWEP.SlotPos = 2
	SWEP.DrawAmmo = false

end

 SWEP.Author = "Entoros"; 
 SWEP.Contact = ""; 
 SWEP.Purpose = "Target enemies"; 
 SWEP.Instructions = "Primary: Select targets\nSecondary: Deselect target";
 
 SWEP.Spawnable = true; 
 SWEP.AdminSpawnable = true; 
   
 SWEP.ViewModel = "models/Weapons/v_pfinger.mdl"; 
 SWEP.WorldModel = "models/props_lab/monitor01a.mdl";
 SWEP.ViewModelFOV = 95

 SWEP.Primary.ClipSize = -1; 
 SWEP.Primary.DefaultClip = -1; 
 SWEP.Primary.Automatic = false; 
 SWEP.Primary.Ammo = "none";
 
 SWEP.Secondary.Ammo = "none";
 
 function SWEP:Initialize()
	self.ActivityTranslate = {}
	self.ActivityTranslate[ACT_HL2MP_IDLE] = ACT_HL2MP_IDLE_MELEE
	self.ActivityTranslate[ACT_HL2MP_WALK] = ACT_HL2MP_WALK_MELEE
	self.ActivityTranslate[ACT_HL2MP_RUN] = ACT_HL2MP_RUN_MELEE
	self.ActivityTranslate[ACT_HL2MP_IDLE_CROUCH] = ACT_HL2MP_IDLE_MELEE
	self.ActivityTranslate[ACT_HL2MP_WALK_CROUCH] = ACT_HL2MP_WALK_CROUCH_MELEE
	self.ActivityTranslate[ACT_HL2MP_GESTURE_RANGE_ATTACK] = ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE
	self.ActivityTranslate[ACT_HL2MP_GESTURE_RELOAD] = ACT_HL2MP_GESTURE_RELOAD_MELEE
	self.ActivityTranslate[ACT_HL2MP_JUMP] = ACT_HL2MP_JUMP_MELEE
	self.ActivityTranslate[ACT_RANGE_ATTACK1] = ACT_RANGE_ATTACK_MELEE
end 
   
 function SWEP:PrimaryAttack()
	RunConsoleCommand("exp_target")
end

function SWEP:SecondaryAttack()
	RunConsoleCommand("exp_removetarget")
end

 function SWEP:Deploy()
	self.Owner:DrawWorldModel(false)
end 